@extends('admin.layout')
@section('title')
 添加节点
@endsection
@section('body')
    <div class="widget-body">
            <div class="form-title">
                节点设置
            </div>
            @if(isset($node))
                {{ Form::model($node,array('class' => 'am-form form-horizontal bv-form','enctype' => 'multipart/form-data')) }}
                <input type="hidden" value="{{$node['id']}}" name="id"/>
            @else
                {{ Form::open(array('class' => 'am-form form-horizontal bv-form','enctype' => 'multipart/form-data')) }}
            @endif
            <div class="form-group has-feedback">
                <label class="col-lg-2 control-label">菜单:</label>
                <div class="col-lg-5">
                    <select name="pnid">
                        <option value="0">-请选择-</option>
                        @foreach($pdata as $item)
                            <option value="{{$item['id']}}" @if(isset($node) && $node['pid'] == $item['id']) selected @endif>{{$item['name']}}</option>
                        @endforeach
                    </select>
                </div>
            </div>
            <div class="form-group has-feedback">
                <label class="col-lg-2 control-label">名称:</label>
                <div class="col-lg-5">
                    {!! Form::text('name') !!}
                </div>
            </div>
            <div class="form-group has-feedback">
                <label class="col-lg-2 control-label">路径: </label>
                <div class="col-lg-5">
                    {!! Form::text('url') !!}
                </div>
            </div>
        <div class="form-group has-feedback">
            <label class="col-lg-2 control-label">排序: </label>
            <div class="col-lg-5">
                {!! Form::text('sort') !!}
            </div>
        </div>
        <div class="form-group has-feedback">
            <label class="col-lg-2 control-label">小图标: </label>
            <div class="col-lg-5">
                {!! Form::text('icon') !!}
            </div>
        </div>
            <div class="form-group has-feedback">
                <label class="col-lg-2 control-label">状态:</label>
                <div class="col-lg-5">
                    <label>
                        <input type="radio" class="colored-blue" name="status" value="0">
                        <span class="text"> 禁用</span>
                    </label>
                    <label>
                        <input type="radio" class="colored-blue" name="status" value="1" checked>
                        <span class="text">正常</span>
                    </label>
                </div>
            </div>

            <div class="form-group">
                <div class="col-lg-offset-2 col-lg-8">
                    <input type="submit" value="确定" class="btn btn-palegreen">
                </div>
            </div>
            {!! Form::close() !!}
        </form>
    </div>
@endsection